<!-- Content Header (Page header) -->
<link href="bowerLibs/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet" />
<section class="content-header">
    <h1>
        {{'操作日志列表'|translate}}
        <small></small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> {{'首页'|translate}} </a></li>
        <li><a href="#"><i class="fa fa-dashboard"></i> {{'日志管理'|translate}} </a></li>
        <li class="active"> {{'操作日志列表'|translate}}</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">
    <div class="box box-danger">
        <div class="box-header with-border" >

            <div  style="margin-right: 15px;">
            <form class="form-inline">

                    <div class="row  ">
                        <div class="col-md-12 text-right">
                            <div class="form-group" >
                                <label for="">{{'操作时间'|translate}}</label>
                                <input input-clear input-blur class="form-control input-sm" kendo-date-time-picker  k-format="'yyyy-MM-dd HH:mm:dd'"  ng-model='searchConditions.search_time_start'>~
                                <input input-clear input-blur class="form-control input-sm" kendo-date-time-picker  k-format="'yyyy-MM-dd HH:mm:dd'"  ng-model='searchConditions.search_time_end'>
                            </div>
                            <div class="input-group">
                                <input type="text" class="form-control input-sm" input-clear style="width: 200px" placeholder="{{'操作人/操作内容'|translate}}" ng-model="searchConditions.search">
                                <span class="input-group-btn">
                                 <button style="height: 30px" type="button" class="btn btn-danger btn-xs" ng-click="search()"><i class="iconfont icon-sousuo_sousuo"></i>{{'搜索'|translate}}</button>
                              </span>
                            </div>
                        </div>
                    </div>

            </form>
            </div>
        </div>

        <div class="box-body" id="autoHeight">
            <div style="overflow: auto">
                <table class="table table-bordered table-hover" style="width: 1500px">
                    <thead>
                    <tr style="background: rgb(250,244,244);">
                        <th style="width: 40px;"></th>
                        <th width="200">{{'操作时间'|translate}}</th>
                        <th width="120">{{'操作人'|translate}}</th>
                        <th width="600">{{'操作内容'|translate}}</th>
                        <th width="120">{{'日志类型'|translate}}</th>
                        <th >{{'访问接口'|translate}}</th>

                    </tr>
                    </thead>
                    <!--($index+1)+gridOptions.paginationCurrentPage*100-->
                    <tbody ng-repeat="obj in model track by $index">
                    <tr>
                        <td  width="40" ><span><i class="fa fa-fw  {{isShow?'fa-minus':'fa-plus'}}" ng-click="isShow=!isShow" data-toggle="collapse" data-target="#test{{$index}}" aria-expanded="true" aria-controls="test{{index}}"></i></span></td>
                        <td >{{obj.JOURNAL_TIME}}</td>
                        <td >{{obj.u_user_info.u_staff_info.STAFF_NAME_CN}}</td>
                        <td >{{obj.description}}</td>
                        <td >{{obj.JOURNAL_TYPE==1?"接口日志":'操作日志'}}</td>
                        <td >{{obj.VISIT_API}}</td>
                    </tr>
                    <tr  ng-if='obj.subList.length&&isShow' >
                        <!--<td style="visibility: hidden; padding: 0;"></td>-->
                        <td colspan="6" style="padding-left: 40px">
                            <div id="test{{$index}}" class="collapse">
                                <table class="table table-bordered table-hover"  style="margin: 0">
                                    <thead>
                                    <tr style="background: rgb(250,244,244);">
                                        <th  ng-repeat="item in obj.subList">{{item.key|translate}}</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr >
                                        <td  ng-repeat="item in obj.subList">{{item.value}}</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>

            <div class="box-body ctrlGrid" >
                <div ui-grid="gridOptions"     ui-grid-edit ui-grid-pagination ui-grid-row-edit ui-grid-cellNav ui-grid-pinning
                     ui-grid-resize-columns ui-grid-auto-resize style="height: 40px"></div>
            </div>

        </div>


        </div>
        <!-- /.box-body -->
</section>
<!-- /.content -->

<style>
    th{
        text-align: center;
    }
    td{
        text-align: center;
    }
    .form-group .k-datetimepicker .k-picker-wrap .k-i-clock {
        display: inline-block;
    }
    .k-widget.form-control{
        border: 0;
    }
</style>
